package com.lp.yuojbackendserviceclient.service;

import com.lp.yuojbackendmodel.entity.Question;
import com.lp.yuojbackendmodel.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author lp337
* @description 针对表【question(题目)】的数据库操作Service
* @createDate 2024-03-26 17:55:44
*/
@FeignClient(name = "yuoj-backend-question-service",path = "/api/question/inner")
public interface QuestionFeignClient {
    /**
     * 根据id查问题
     * @param questionId
     * @return
     */
    @GetMapping("/get/id")
    Question getById(@RequestParam("questionId") long questionId);

    /**
     * 根据id查提交记录
     * @param questionSubmitId
     * @return
     */
    @GetMapping("/question_submit/get/id")
    QuestionSubmit getSubmitById(@RequestParam("questionSubmitId")long questionSubmitId);

    /**
     * 根据id更新提交记录
     * @param questionSubmitUpdate
     * @return
     */
    @GetMapping("/question_submit/update")
    boolean updateSubmitById(@RequestParam("questionSubmitUpdate") QuestionSubmit questionSubmitUpdate);

}
